import { Text } from '@tarojs/components'
import classNames from 'classnames';
import './index.scss';

export const icons = [
  'reduce',
  'close-circle',
  'check-circle',
  'search',
  'news',
  'user',
  'safe',
  'clock',
  'help',
  'bulb',
  'allocat',
  'chevron-down',
  'alert-circle',
  'flow',
  'blocked',
  'chevron-up',
  'monitor',
  'settings',
  'price-circle',
  'teamwork',
  'Rectangle',
  'heart',
  'add-circle',
  'reverse',
  'close',
  'target',
  'refresh',
  'wisdom',
  'investment',
  'goods',
  'order',
  'locked',
  'report',
  'channel',
  'purchase',
  'price',
  'home',
  'calendar',
  'rect_36',
  'release',
  'toolbox',
  'in-out',
  'unlock',
  'delete',
  'rect_42',
  'rect_43',
  'rect_44',
  'rect_45',
  'dialogue',
  'rect_47',
  'rect_48',
  'rect_49',
  'rect_50',
  'list',
  'rect_52',
  'image',
  'rect_54',
  'rect_55',
  'rect_56',
  'rect_57',
  'contents',
  'rect_59',
  'rect_60',
  'rect_61',
  'save',
  'rect_63',
  'rect_64',
  'rect_65',
  'rect_66',
  'rect_67',
  'rect_68',
  'rect_69',
  'rect_70',
  'rect_71',
  'rect_72',
  'rect_73',
  'rect_74',
  'rect_75',
  'rect_76',
  'rect_77',
  'rect_78',
  'rect_79',
  'rect_80',
  'rect_81',
  'rect_82',
  'rect_83',
  'rect_84',
  'rect_85',
  'rect_86',
  'rect_87',
  'rect_88',
  'rect_89',
  'rect_90',
  'rect_91',
  'rect_92',
  'rect_93',
  'rect_94',
  'rect_95',
  'rect_96',
  'rect_97',
  'rect_98',
  'rect_99',
  'rect_100',
  'rect_101',
  'rect_102',
  'rect_103',
  'rect_104',
  'rect_105',
  'rect_106',
  'rect_107',
  'rect_108',
  'rect_109',
  'rect_110',
  'rect_111',
  'rect_112',
  'rect_113',
  'rect_114',
  'rect_115',
  'rect_116',
  'rect_117',
  'rect_118',
  'rect_119',
  'rect_120',
  'rect_121',
  'rect_122',
  'rect_123',
  'rect_124',
  'rect_125',
  'rect_126',
  'rect_127',
  'rect_128',
  'rect_129',
  'rect_130',
  'rect_131',
  'rect_132',
  'rect_133',
  'rect_134',
  'rect_135',
  'rect_136',
  'rect_137',
  'rect_138',
  'rect_139',
  'rect_140',
  'rect_141',
  'rect_142',
  'rect_143',
  'rect_144',
  'rect_145',
  'rect_146',
  'rect_147',
  'rect_148',
  'rect_149',
  'rect_150',
  'rect_151',
  'rect_152',
  'rect_153',
  'rect_154',
  'rect_155',
  'rect_156',
  'rect_157',
  'rect_158',
  'rect_159',
  'rect_160',
  'rect_160',
  'rect_161',
  'rect_162',
  'rect_163',
  'rect_164',
  'rect_165',
  'rect_166',
  'rect_167',
  'rect_168',
  'rect_169',
  'rect_170',
  'rect_171',
  'rect_172',
  'rect_173',
  'rect_174',
  'rect_175',
  'rect_176',
  'rect_177',
  'rect_178',
  'rect_179',
  'rect_180',
  'rect_181',
  'rect_182',
  'rect_183',
  'rect_184',
  'rect_185',
  'rect_186',
  'rect_187',
  'rect_188',
  'rect_189',
  'rect_190',
  'rect_191',
  'rect_192',
  'rect_193',
  'rect_194',
  'rect_195',
  'rect_196',
  'rect_197',
  'rect_198',
  'rect_199',
  'rect_200',
  'rect_201',
  'rect_202',
  'rect_203',
  'rect_204',
  'rect_205',
  'rect_206',
  'rect_207',
  'rect_208',
  'rect_209',
  'rect_210',
  'rect_211',
  'rect_212',
  'rect_213',
  'rect_214',
  'rect_215',
  'rect_216',
  'rect_217',
  'rect_218',
  'rect_219',
  'rect_220',
  'rect_221',
  'rect_222',
  'rect_223',
  'rect_224',
  'rect_225',
  'rect_226',
  'rect_227',
  'rect_228',
  'rect_229',
  'rect_230',
  'rect_231',
  'rect_232',
  'rect_233',
  'rect_234',
  'rect_235',
  'rect_236',
  'rect_237',
  'rect_238',
  'rect_239',
  'rect_240',
  'rect_241',
  'rect_242',
  'rect_243',
  'rect_244',
  'rect_245',
  'rect_246',
  'rect_247',
  'rect_248',
  'rect_249',
  'rect_250',
  'rect_251',
  'rect_252',
  'rect_253',
  'rect_254',
  'rect_255',
  'location',
  'rect_257',
  'rect_258',
  'liangjipin',
  'end'
]


interface IconProps {
  name: string;
  size?: number;
  className?: string;
  color?: string;
  style?:any;
  prefixClass?: string;
  spin?: boolean;
}
// 使用React.FC泛型类型
const MyIcon: React.FC<IconProps> = ({
  // customStyle,
  className = '',
  prefixClass = 'icon',
  name = '',
  size = 14,
  color = '',
  spin = false,
  style = {}
}) => {
  const rootStyle = {
    fontSize: size,
    color,
    ...style
  }
  const iconName = name ? `${prefixClass}-${name}` : '';
  const iconSpin = spin ? `${prefixClass}-spin` : '';
  return (
    <Text
      className={classNames(
        'iconfont',
        prefixClass,
        iconSpin,
        iconName,
        className,
      )}
      style={rootStyle}
    >
    </Text>
  )
}
export default MyIcon;
